import {
  getFtpRecord,
  confirmTopicInfo,
  deleteTopicInfo,
  updateTopicInfo,
  getTopicInfo,
  getClientNamesByUser,
  readFtpFileContent,
  downloadFtpFile,
  getBasicInfo,
  deleteBasicInfo,
  updateBasicInfo,
  confirmBasicInfo,
  insertBasicInfo,
  parseFtpFile,
  compareKafka2Xml,
  forceAccess
} from '@/api/editingController'

const state = {}
const mutations = {}
const actions = {

  // 查询FTP文件记录
  async getFtpRecord(...rest) {
    const result = await getFtpRecord(rest[1])
    return result
  },

  // 获取FTPClient信息
  async getClientNamesByUser(...rest) {
    const result = await getClientNamesByUser(rest[1])
    return result
  },

  async readFtpFileContent(...rest) {
    const result = await readFtpFileContent(rest[1])
    return result
  },

  async downloadFtpFile(...rest) {
    const result = await downloadFtpFile(rest[1])
    return result
  },

  async parseFtpFile(...rest) {
    const result = await parseFtpFile(rest[1])
    return result
  },

  async forceAccess(...rest) {
    const result = await forceAccess(rest[1])
    return result
  },

  async compareKafka2Xml(...rest) {
    const result = await compareKafka2Xml(rest[1])
    return result
  },

  async getBasicInfo(...rest) {
    const result = await getBasicInfo(rest[1])
    return result
  },

  async confirmBasicInfo(...rest) {
    const result = await confirmBasicInfo(rest[1])
    return result
  },

  async deleteBasicInfo(...rest) {
    const result = await deleteBasicInfo(rest[1])
    return result
  },

  async updateBasicInfo(...rest) {
    const result = await updateBasicInfo(rest[1])
    return result
  },

  async insertBasicInfo(...rest) {
    const result = await insertBasicInfo(rest[1])
    return result
  },

  async getTopicInfo(...rest) {
    const result = await getTopicInfo(rest[1])
    return result
  },

  async updateTopicInfo(...rest) {
    const result = await updateTopicInfo(rest[1])
    return result
  },

  async confirmTopicInfo(...rest) {
    const result = await confirmTopicInfo(rest[1])
    return result
  },

  async deleteTopicInfo(...rest) {
    const result = await deleteTopicInfo(rest[1])
    return result
  },
}

const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
